<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div>
  {{info}}
  <ul>
    <!--:key="变量"  为生成出来的元素设置一个唯一值(为复用时使用),
    如果不涉及到复用是可以省略此属性的-->
    <li v-for="(name,i) in arr" :key="i">{{name+i}}</li>
    <table border="1">
      <caption>员工列表</caption>
      <tr><th>编号</th><th>姓名</th><th>工资</th><th>工作</th></tr>
      <tr v-for="(emp,i) in empArr" :key="i">
        <td>{{i+1}}</td>
        <td>{{emp.name}}</td>
        <td>{{emp.salary}}</td>
        <td>{{emp.job}}</td>
      </tr>
    </table>
  </ul>
</div>
<script src="https://cdn.staticfile.org/vue/2.2.2/vue.min.js"></script>
<script>
  let v = new Vue({
    el:"body>div",
    data:{
      info:"循环遍历指令",
      arr:["张三","李四","王五"],
      empArr:[{name:"刘备",salary:3000,job:"销售"},
        {name:"刘禅",salary:5000,job:"人事"},
        {name:"孙尚香",salary:8000,job:"程序员"}]
    }
  })
</script>
</body>
</html>